bitkeeper revision 1.653 (3fe37bb8JkaTBzrrWzReULGfBXkwYQ)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 19 Dec 2003 22:29:12 +0000 (22:29 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 19 Dec 2003 22:29:12 +0000 (22:29 +0000)
dom0_ops.c, Makefile:
  Bug fixes to dom0 interface.

tools/xc/lib/Makefile
xen/common/dom0_ops.c

index c19643e8fbe706b11e73ba0d0071ca7583ce9627..2693372048f71f58bd5844d519b97921bf777b37 100644 (file)
@@ -22,7 +22,7 @@ install: all
        mkdir -p /usr/lib
        mkdir -p /usr/include
        cp -a $(LIB) /usr/lib
-       chmod 755 /usr/bin/$(LIB)
+       chmod 755 /usr/lib/$(LIB)
        cp -a xc.h /usr/include
        chmod 644 /usr/include/xc.h
 
@@ -30,7 +30,7 @@ dist: all
        mkdir -p ../../../../install/lib
        mkdir -p ../../../../install/include
        cp -a $(LIB) ../../../../install/lib
-       chmod 755 ../../../../install/bin/$(LIB)
+       chmod 755 ../../../../install/lib/$(LIB)
        cp -a xc.h ../../../../install/include
        chmod 644 ../../../../install/include/xc.h
 
index 2f3073a1c4acda2309b8b22be1cf5a734a849130..da6c39379a53f77056a531dc92458a73780c600f 100644 (file)
@@ -104,8 +104,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
         ret = -EINVAL;
         if ( p != NULL )
         {
-            if ( (ret = final_setup_guestos(p, &op.u.builddomain)) == 0 )
-                ret = p->domain;
+            ret = final_setup_guestos(p, &op.u.builddomain);
             put_task_struct(p);
         }
     }
@@ -121,7 +120,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
             {
                 wake_up(p);
                 reschedule(p);
-                ret = p->domain;
+                ret = 0;
             }
             put_task_struct(p);
         }
@@ -191,40 +190,42 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
         ret = -EINVAL;
         if ( p != NULL )
         {
-           if( cpu == -1 )
-             p->cpupinned = 0;
-           else
-             {
+           if ( cpu == -1 )
+            {
+                p->cpupinned = 0;
+                ret = 0;
+           }
+            else
+            {
                /* For the moment, we are unable to move running
-               domains between CPUs. (We need a way of synchronously
-               stopping running domains). For now, if we discover the
-               domain is not stopped already then cowardly bail out
-               with ENOSYS */
+                   domains between CPUs. (We need a way of synchronously
+                   stopping running domains). For now, if we discover the
+                   domain is not stopped already then cowardly bail out
+                   with ENOSYS */
 
                if( !(p->state & TASK_STOPPED) ) 
-                 ret = -ENOSYS;
-               else
-                 {
+                {
+                    ret = -ENOSYS;
+               }
+                else
+                {
                    /* We need a task structure lock here!!! 
                       FIX ME!! */
                    cpu = cpu % smp_num_cpus;
                    p->processor = cpu;
                    p->cpupinned = 1;
-                 }
-             }
-
-           ret = 0;
+                    ret = 0;
+                }
+            }
             put_task_struct(p);
-        }
-       
+        }      
     }
     break;
 
     case DOM0_BVTCTL:
     {
         unsigned long  ctx_allow = op.u.bvtctl.ctx_allow;
-        ret = sched_bvtctl(ctx_allow);
-        
+        ret = sched_bvtctl(ctx_allow);        
     }
     break;
 
@@ -407,7 +408,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
 
     case DOM0_MSR:
     {
-        if (op.u.msr.write)
+        if ( op.u.msr.write )
        {
             msr_cpu_mask = op.u.msr.cpu_mask;
             msr_addr = op.u.msr.msr;